/*
 * @Description: 秋
 * @Author: hwh
 * @Date: 2024-09-20 08:41:36
 * @LastEditors: hwh
 * @LastEditTime: 2024-09-20 09:18:50
 */
public abstract class Animal{
    private String color;
    private int age;
    public Animal(){
        System.out.println("");
    }
    public Animal(String color,int age){
        this.color=color;
        this.age=age;
    }
        
        //因为这两个方法没有具体的实现 声明为抽象类
        public abstract void eat();
        public abstract void sleep();
        public String toString(){
        String str="这个动物的颜色是: "+this.color",这个动物的年龄是: "+this.age;
        return str;
    }
}